using FluentNHibernate.Mapping;

namespace TaskKernel.Domain.Nhibernate.Mappings
{
    public class RatingMap : ClassMap<Rating>
    {
        public RatingMap()
        {
            Table("task_Ratings");
            Id(x => x.UID, "GID").GeneratedBy.GuidNative();
            Map(x => x.DateCreate).Column("DateCreate");
            Map(x => x.RatingValue).Column("Value");
            Map(x => x.RatingText).Column("Text");
            Map(x => x.RoleOwner).Column("RoleOwner");
            References(x => x.Owner, "AccountGID");
            References(x => x.Task).Column("TaskGID");
        }
    }
}